# Tell SCons to create our build files in the 'build' directory
#VariantDir('build', 'src', duplicate=0)
#VariantDir('build', 'src', duplicate=0)

# Set our source files
source_files = ['opendhcpd.cpp','dhcpd.cpp']

# Set our required libraries
libraries = ['pthread']

library_paths = ''

env = Environment()
#env.VariantDir('build', 'src', duplicate=0)
#myfile = env.Command( ['multi.pb.cc', 'multi.pb.h'], 'multi.proto', 'cd ./$SOURCE.dir && protoc --cpp_out=. $SOURCE.file')
#env.AlwaysBuild(myfile)
# Set our g++ compiler flags

env.Append( CPPFLAGS=['-std=c++11', '-pthread', '-c'] )


lib = env.StaticLibrary('dhcpd', source_files)
#env.InstallAs( target = "../lib/", source = lib );
# Tell SCons the program to build
#env.Program('build/c++threads', source_files, LIBS = libraries, LIBPATH = library_paths)



test_lib = env.Program('main_test',  ['main.cpp'], LIBS = lib + libraries )
#env.Command(['test_util2'],'test.cpp', './$SOURCE.dir/test_util' )
